package me.yushuai.wukong.base.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Objects;

/**
 * @author zhoushuai@189.cn
 * @since 2023-03-01
 */
@Entity
@Table(name = "BAS_LOT_ATTR_DEF")
public class LotAttrDef {

    @Id
    @Column(name = "id")
    private Long id;

    private String attr;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAttr() {
        return attr;
    }

    public void setAttr(String attr) {
        this.attr = attr;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LotAttrDef that = (LotAttrDef) o;
        return getId().equals(that.getId()) && getAttr().equals(that.getAttr());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId(), getAttr());
    }

    @Override
    public String toString() {
        return "LotAttrDef{" +
                "id=" + id +
                ", attr='" + attr + '\'' +
                '}';
    }
}
